﻿<Window x:Class="Adan.Client.Dialogs.ProfileOptionsEditDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Utils="clr-namespace:Adan.Client.Common.Utils;assembly=Adan.Client.Common"
        Title="Edit profile: "
        ResizeMode="NoResize" 
        ShowInTaskbar="False" 
        WindowStartupLocation="CenterOwner" 
        WindowStyle="ToolWindow" 
        mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        Width="300"
        Height="300"
        Name="ProfileOptionsWindow"
        Style="{StaticResource DefaultWindowStyle}">
    <Window.Resources>
        <Utils:InverseBooleanConverter x:Key="InverseBooleanConverter" />
    </Window.Resources>
    <Grid Margin="3">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <ListBox Grid.Row="0" Margin="0,0,0,5" SelectedItem="{Binding Path=SelectedOption}" Name="lstOptions">
            <ListBox.Resources>
                <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
                    <EventSetter Event="MouseDoubleClick" Handler="HandleItemDoubleClick"/>
                </Style>
            </ListBox.Resources>
            <ListBoxItem Tag="Aliases">
                <StackPanel Orientation="Horizontal">
                    <TextBlock>Aliases</TextBlock>
                    <TextBlock Text="{Binding Path=AliasesCount, StringFormat=' ({0})'}" />
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="Groups">
                <StackPanel Orientation="Horizontal">
                    <TextBlock>Groups</TextBlock>
                    <TextBlock Text="{Binding Path=GroupsCount, StringFormat=' ({0})'}" />
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="Highlights">
                <StackPanel Orientation="Horizontal">
                    <TextBlock>Highlights</TextBlock>
                    <TextBlock Text="{Binding Path=HighlightsCount, StringFormat=' ({0})'}" />
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="Hotkeys">
                <StackPanel Orientation="Horizontal">
                    <TextBlock>Hotkeys</TextBlock>
                    <TextBlock Text="{Binding Path=HotkeysCount, StringFormat=' ({0})'}" />
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="Substitutions">
                <StackPanel Orientation="Horizontal">
                    <TextBlock>Substitutions</TextBlock>
                    <TextBlock Text="{Binding Path=SubstitutionsCount, StringFormat=' ({0})'}" />
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="Triggers">
                <StackPanel Orientation="Horizontal">
                    <TextBlock>Triggers</TextBlock>
                    <TextBlock Text="{Binding Path=TriggersCount, StringFormat=' ({0})'}" />
                </StackPanel>
            </ListBoxItem>
        </ListBox>
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Button Grid.Column="0" Command="{Binding Path=EditOptionsCommand}" CommandParameter="{Binding ElementName=ProfileOptionsWindow, Path=.}" IsEnabled="{Binding Path=CanEditProfile}" MinWidth="50">Edit</Button>
            <Button Grid.Column="1" Command="{Binding Path=ImportProfileCommand}" IsEnabled="{Binding Path=CanImportProfile}" MinWidth="50" HorizontalAlignment="Left" Margin="5,0,0,0" >Import</Button>
            <Button Grid.Column="2" Click="HandleCloseClick" HorizontalAlignment="Right" IsCancel="True"  MinWidth="50">Close</Button>
        </Grid>
    </Grid>
</Window>
